In an application server or database environment which enables access by software applications to data in a database, typically the data retrieved from the database must be allocated in memory arrays or buffers before it can be accessed by the requesting application. Generally, whenever an application makes a request to the database, the database driver (e.g., Java Database Connectivity, JDBC driver) first receives the required data into a native interface (e.g., Java Native Interface, JNI) layer, and then provides that data to a presentation (e.g., Java) layer, where it can be accessed by the application.
However, in some environments, the arrays or buffers allocated in memory for use with the data can be very large, and can include unused or empty space. Additionally, copying of data between the layers can be computationally expensive.